Repository navigation
rfc(pnpr): SQL metadata storage - #48
Conversation
Split from #44. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 55 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
…side Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add npm tracker evidence for the single-document model: 17.9 MB package documents, a 7-minute deprecate, and ETARGET after publish from separately cached full and abbreviated views. Add insert-only tag history and a separate README relation, and expose the committed package generation so a client can read its own publication. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Updated in e27176e.
Written by an agent (Claude Code, claude-opus-5-5). |
|
A proposed answer to the open question "Should the per-version fragments themselves become a client-facing read path?", with measurements. It came up in the platform variants RFC (#51), where variant integrities would make packuments several times larger, but it applies to every package. WhyMost of a gzipped packument is hashes. Per-version digests and npm registry signatures do not compress, while everything else repeats from version to version. I measured npm's abbreviated documents of 44 popular packages, in the form pnpr serves (without
ProposalEvery response stays a plain GET addressed by its URL, so a CDN caches it for everyone. There are no range queries,
The fragment cache this RFC already describes maps directly onto it: a version document is one rendered fragment, and the split document is the package view with the large fragments cut down. Prototype and benchmarkImplemented in pnpm/pnpm#17522: pnpr's
Only 180 of the 711 documents crossed the 64 KiB threshold, but they hold most of the bytes. Open points
🤖 Generated with Claude Code (Claude Opus 5.5) |
|
A suggested review order for the pnpr metadata drafts, since they reference each other:
These can be reviewed at any point: #47 (publish-time manifest verification) doesn't depend on the others, and #45 and #46 build only on #48. #44 is closed, superseded by #47, #48, and #49. The proposal in my earlier comment is now #54, and the design changed since. Its benchmark numbers came from a setup where pnpm fetched full documents for optional dependencies, so they understated the gain. With that fixed, cold resolution of a 787-package app is 72–81% faster and downloads 5.3 MB of metadata instead of 30.3 MB; the numbers are in #54. Written by an agent (Claude Code, claude-opus-5-5). 🤖 Generated with Claude Code |
PR Summary by QodoRFC: Store pnpr metadata in SQL and generate cached npm views
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
… generation scope
* docs(pnpr): propose atomic workspace publication * docs(pnpr): define publication through SQL transactions * rfc(pnpr): build on the split SQL metadata storage draft #44 was split into #47, #48, and #49. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * rfc(pnpr): add evidence, keyless retries, uploads by integrity, and workload batches Add npm tracker evidence for half-published releases and ghost-version conflicts. Name the pnpr gaps the transaction must close: a byte-identical retry returns VersionAlreadyPublished, one 100 MiB body carries every archive, and OIDC workloads can only PUT a single package. Upload archives by integrity before commit, treat content as the idempotency key for keyless clients, let workloads submit transactions, and let staging hold a whole transaction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * rfc(pnpr): record committed publications for clients to read Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * rfc(pnpr): advance the current reference on commit, backfill publications, keep the policy epoch across replacement Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * rfc(pnpr): commit publications with releases, match whole keyless requests, recover outcomes after revocation, drain before export Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * rfc(pnpr): settle transaction scope, ecosystems, keyless batches, and retention Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Split from #44. Stores pnpr's authoritative metadata in a transactional SQL database and keeps archives in the filesystem or object storage. npm package documents become generated views, cached as per-version fragments. Embedded SQLite comes first; a shared backend (PostgreSQL or Turso) is added only after it passes a shared conformance suite.
This is the storage contract that #45 and #46 build on, in place of the SQL section of #44.
Related drafts
🤖 Generated with Claude Code